﻿using System;
using System.ComponentModel;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;

namespace TNO.Education.SearchResult
{
    [ToolboxItemAttribute(false)]
    public class SearchResult : WebPart
    {
        // Visual Studio might automatically update this path when you change the Visual Web Part project item.
        private const string _ascxPath = @"~/_CONTROLTEMPLATES/TNO.Education/SearchResult/SearchResultUserControl.ascx";

        #region Properties

        private bool _searchEndWidth = false;
        [Personalizable(PersonalizationScope.Shared),
        WebBrowsable(true), WebDisplayName("Tìm tên gần đúng"), Category("Customize"), Description("Tìm tên gần đúng")]
        public bool SearchEndWidth
        {
            get
            {
                return _searchEndWidth;
            }
            set
            {
                _searchEndWidth = value;
            }
        } 

        #endregion

        #region Constructors
        
        public SearchResult()
        {
            this.ChromeType = PartChromeType.None;
        } 

        #endregion

        #region Methods
        
        protected override void CreateChildControls()
        {
            Control control = Page.LoadControl(_ascxPath);
            Controls.Add(control);
        } 

        #endregion

    }
}
